<!DOCTYPE html>
<html lang="en">
<head prefix="og: http://ogp.me/ns#">
  <meta charset="utf-8">
  <title>starRTC文档</title>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Canonical links -->
  <link rel="canonical" href="https://starrtc.gitee.io/en/docs/web-2.html">
  <!-- Alternative links -->
  
    
      <link rel="alternative" hreflang="en" href="https://starrtc.gitee.io/docs/web-2.html">
    
      <link rel="alternative" hreflang="zh-cn" href="https://starrtc.gitee.io/zh-cn/docs/web-2.html">
    
  
  <!-- Icon -->
  <link rel="apple-touch-icon" sizes="57x57" href="/icon/apple-touch-icon-57x57.png">
  <link rel="apple-touch-icon" sizes="114x114" href="/icon/apple-touch-icon-114x114.png">
  <link rel="apple-touch-icon" sizes="72x72" href="/icon/apple-touch-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="144x144" href="/icon/apple-touch-icon-144x144.png">
  <link rel="apple-touch-icon" sizes="60x60" href="/icon/apple-touch-icon-60x60.png">
  <link rel="apple-touch-icon" sizes="120x120" href="/icon/apple-touch-icon-120x120.png">
  <link rel="apple-touch-icon" sizes="76x76" href="/icon/apple-touch-icon-76x76.png">
  <link rel="apple-touch-icon" sizes="152x152" href="/icon/apple-touch-icon-152x152.png">
  <link rel="icon" type="image/png" href="/icon/favicon-196x196.png" sizes="196x196">
  <link rel="icon" type="image/png" href="/icon/favicon-160x160.png" sizes="160x160">
  <link rel="icon" type="image/png" href="/icon/favicon-96x96.png" sizes="96x96">
  <link rel="icon" type="image/png" href="/icon/favicon-16x16.png" sizes="16x16">
  <link rel="icon" type="image/png" href="/icon/favicon-32x32.png" sizes="32x32">
  <meta name="msapplication-TileColor" content="#2f83cd">
  <meta name="msapplication-TileImage" content="/icon/mstile-144x144.png">
  <!-- CSS -->
  <!-- build:css build/css/navy.css -->
  <link rel="stylesheet" href="/css/navy.css">
  <!-- endbuild -->
  <link href="https://starrtc.gitee.io/googleapis.css" rel="stylesheet" type="text/css">
 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> 
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css">
  <!-- RSS -->
  <link rel="alternate" href="/atom.xml" title="starRTC文档">
  <!-- Open Graph -->
  <meta name="description" content="SDK description and api introduction1. Basic instructions of the SDK table th:nth-of-type(2) {     width: 200px; }      Class Introduction Function     LOG_LEVEL Log level Log level enumeration   CHAT">
<meta property="og:type" content="website">
<meta property="og:title" content="starRTC文档">
<meta property="og:url" content="https://starrtc.gitee.io/en/docs/web-2.html">
<meta property="og:site_name" content="starRTC文档">
<meta property="og:description" content="SDK description and api introduction1. Basic instructions of the SDK table th:nth-of-type(2) {     width: 200px; }      Class Introduction Function     LOG_LEVEL Log level Log level enumeration   CHAT">
<meta property="og:locale" content="en">
<meta property="og:updated_time" content="2020-09-06T00:27:31.352Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="starRTC文档">
<meta name="twitter:description" content="SDK description and api introduction1. Basic instructions of the SDK table th:nth-of-type(2) {     width: 200px; }      Class Introduction Function     LOG_LEVEL Log level Log level enumeration   CHAT">
<meta name="twitter:site" content="hexojs">
<meta property="fb:admins" content="100000247608790">
  <!-- Google Analytics -->
  
</head>

<body>
  <div id="container">
    <header id="header" class="wrapper">
  <div id="header-inner" class="inner">
    <h1 id="logo-wrap">
      
      <a href="https://starrtc.gitee.io/" id="logo">starRTC</a>
    </h1>
    <nav id="main-nav">
      <a href="https://starrtc.gitee.io/" class="main-nav-link">Home</a><a href="https://blog.starRTC.com" class="main-nav-link">Blog</a><a href="https://github.com/starrtc/android-demo/issues" class="main-nav-link">Forum</a><a href="/en/docs/" class="main-nav-link">Docs</a><a href="/en/download/" class="main-nav-link">Download</a><a href="/en/contact/" class="main-nav-link">Contact</a>
      
    </nav>
    <div id="lang-select-wrap">
      <label id="lang-select-label"><i class="fa fa-globe"></i><span>English</span></label>
      <select id="lang-select" data-canonical="docs/web-2.html">
        
          <option value="en" selected>English</option>
        
          <option value="zh-cn">简体中文</option>
        
      </select>
    </div>
    <a id="mobile-nav-toggle">
      <span class="mobile-nav-toggle-bar"></span>
      <span class="mobile-nav-toggle-bar"></span>
      <span class="mobile-nav-toggle-bar"></span>
    </a>
  </div>
</header>

    <div id="content-wrap">
  <div id="content" class="wrapper">
    <div id="content-inner">
      <article class="article-container" itemscope itemtype="http://schema.org/Article">
        <div class="article-inner">
          <div class="article">
            <div class="inner">
              <header class="article-header">
                <h1 class="article-title" itemprop="name"></h1>
                <a href="https://github.com/starRTC/docs/edit/master/en/docs/web-2.md" class="article-edit-link" title="Improve this doc"><i class="fa fa-pencil"></i></a>
              </header>
              <div class="article-content" itemprop="articleBody">
                <h1 id="SDK-description-and-api-introduction" class="article-heading"><a href="#SDK-description-and-api-introduction" class="headerlink" title="SDK description and api introduction"></a>SDK description and api introduction<a class="article-anchor" href="#SDK-description-and-api-introduction" aria-hidden="true"></a></h1><h2 id="1-Basic-instructions-of-the-SDK" class="article-heading"><a href="#1-Basic-instructions-of-the-SDK" class="headerlink" title="1. Basic instructions of the SDK"></a>1. Basic instructions of the SDK<a class="article-anchor" href="#1-Basic-instructions-of-the-SDK" aria-hidden="true"></a></h2><style>
table th:nth-of-type(2) {
    width: 200px;
}
</style>

<table>
<thead>
<tr>
<th style="text-align:left">Class</th>
<th style="text-align:left">Introduction</th>
<th style="text-align:left">Function</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">LOG_LEVEL</td>
<td style="text-align:left">Log level</td>
<td style="text-align:left">Log level enumeration</td>
</tr>
<tr>
<td style="text-align:left">CHATROOM_LIST_TYPE</td>
<td style="text-align:left">List type</td>
<td style="text-align:left">List type enumeration</td>
</tr>
<tr>
<td style="text-align:left">StarRtc.StarConfig</td>
<td style="text-align:left">Configuration object</td>
<td style="text-align:left">Save the configuration information</td>
</tr>
<tr>
<td style="text-align:left">StarRtc.StarUserInfo</td>
<td style="text-align:left">User information object</td>
<td style="text-align:left">Save the user information</td>
</tr>
<tr>
<td style="text-align:left">StarRtc.StarSDK</td>
<td style="text-align:left">SDK instance class</td>
<td style="text-align:left">Login, send and receive IM messages, group management, send and receive group messages, SDK advanced service encapsulation interface, and allow multiple instances</td>
</tr>
<tr>
<td style="text-align:left">StarRtc.StarRoomSDK</td>
<td style="text-align:left">Room SDK</td>
<td style="text-align:left">Integrate videoSDK and chatSDK to provide complete room function（voip，meeting，live）</td>
</tr>
<tr>
<td style="text-align:left">StarRtc.StarSuperRoomSDK</td>
<td style="text-align:left">Super room SDK</td>
<td style="text-align:left">the Super room SDK, half duplex, and free talking</td>
</tr>
<tr>
<td style="text-align:left">StarRtc.StarChatRoomSDK</td>
<td style="text-align:left">Chat room SDK</td>
<td style="text-align:left">Simple business package for chat room SDK</td>
</tr>
<tr>
<td style="text-align:left">StarRtc.StarVideoRoomSDK</td>
<td style="text-align:left">Video room SDK</td>
<td style="text-align:left">Simple business package for video SDK</td>
</tr>
<tr>
<td style="text-align:left">StarRtc.StarVideoSDK</td>
<td style="text-align:left">Video SDK</td>
<td style="text-align:left">It is responsible for audio and video functions</td>
</tr>
<tr>
<td style="text-align:left">StarRtc.StarChatSDK</td>
<td style="text-align:left">Chat SDK</td>
<td style="text-align:left">It is responsible for chat function</td>
</tr>
</tbody>
</table>
<hr>
<h2 id="2-LOG-LEVEL" class="article-heading"><a href="#2-LOG-LEVEL" class="headerlink" title="2. LOG_LEVEL"></a>2. LOG_LEVEL<a class="article-anchor" href="#2-LOG-LEVEL" aria-hidden="true"></a></h2><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">var</span> LOG_LEVEL = &#123;</span><br><span class="line">	LOG_LEVEL_DEBUG: i++,</span><br><span class="line">	LOG_LEVEL_INFO: i++,</span><br><span class="line">	LOG_LEVEL_WARN: i++,</span><br><span class="line">	LOG_LEVEL_ERROR: i++</span><br><span class="line">	&#125;;</span><br><span class="line"></span><br><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Set the log level, open the low-level log will contain high-level logs, such as opening DEBUG, INFO, WARN, ERROR will be opened at the same time, the default status is to open DEBUG mode.</span></span><br><span class="line"><span class="comment"> * @param logLevel	log level，见LOG_LEVEL</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">StarRtc.InitlogLevel = <span class="function"><span class="keyword">function</span> (<span class="params">logLevel</span>)</span></span><br></pre></td></tr></table></figure>
<hr>
<h2 id="3-CHATROOM-LIST-TYPE" class="article-heading"><a href="#3-CHATROOM-LIST-TYPE" class="headerlink" title="3. CHATROOM_LIST_TYPE"></a>3. CHATROOM_LIST_TYPE<a class="article-anchor" href="#3-CHATROOM-LIST-TYPE" aria-hidden="true"></a></h2><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="keyword">var</span> CHATROOM_LIST_TYPE = &#123;</span><br><span class="line">	<span class="comment">//list type：chat room</span></span><br><span class="line">	CHATROOM_LIST_TYPE_CHATROOM: i++,</span><br><span class="line">	<span class="comment">//list type：live</span></span><br><span class="line">	CHATROOM_LIST_TYPE_LIVE: i++,</span><br><span class="line">	<span class="comment">//list type：push live stream</span></span><br><span class="line">	CHATROOM_LIST_TYPE_LIVE_PUSH: i++,</span><br><span class="line">	<span class="comment">//list type：meeting</span></span><br><span class="line">	CHATROOM_LIST_TYPE_MEETING: i++,</span><br><span class="line">	<span class="comment">//list type：push meeting stream</span></span><br><span class="line">	CHATROOM_LIST_TYPE_MEETING_PUSH: i++,</span><br><span class="line">	<span class="comment">//list type：mini class</span></span><br><span class="line">	CHATROOM_LIST_TYPE_CLASS: i++,</span><br><span class="line">	<span class="comment">//list type：push mini class stream</span></span><br><span class="line">	CHATROOM_LIST_TYPE_CLASS_PUSH: i++,</span><br><span class="line">	<span class="comment">//list type：audio live</span></span><br><span class="line">	CHATROOM_LIST_TYPE_AUDIO_LIVE: i++,</span><br><span class="line">	<span class="comment">//list type：push audio live stream</span></span><br><span class="line">	CHATROOM_LIST_TYPE_AUDIO_LIVE_PUSH: i++,</span><br><span class="line">	<span class="comment">//list type：super room</span></span><br><span class="line">	CHATROOM_LIST_TYPE_SUPER_ROOM: i++,</span><br><span class="line">	<span class="comment">//list type：push super room stream</span></span><br><span class="line">	CHATROOM_LIST_TYPE_SUPER_ROOM_PUSH: i++</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>
<hr>
<h2 id="4-StarRtc-StarConfig" class="article-heading"><a href="#4-StarRtc-StarConfig" class="headerlink" title="4. StarRtc.StarConfig"></a>4. StarRtc.StarConfig<a class="article-anchor" href="#4-StarRtc-StarConfig" aria-hidden="true"></a></h2><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">//Whether to open the use of AEC</span></span><br><span class="line">StarRtc.StarConfig.configUseAEC;</span><br><span class="line"></span><br><span class="line"><span class="comment">//msgServer address</span></span><br><span class="line">StarRtc.StarConfig.msgServerUrl;</span><br><span class="line"><span class="comment">//msgServer websocket port</span></span><br><span class="line">StarRtc.StarConfig.msgServerWebsocketPort;</span><br><span class="line"><span class="comment">//chatRoomServer address</span></span><br><span class="line">StarRtc.StarConfig.chatRoomServerUrl;</span><br><span class="line"><span class="comment">//chatRoomServer websocket port</span></span><br><span class="line">StarRtc.StarConfig.chatRoomServerWebsocketPort;</span><br><span class="line"><span class="comment">//srcServer address</span></span><br><span class="line">StarRtc.StarConfig.srcServerUrl;</span><br><span class="line"><span class="comment">//srcServer websocket port </span></span><br><span class="line">StarRtc.StarConfig.srcServerWebsocketPort;</span><br><span class="line"><span class="comment">//srcServer webrtc port</span></span><br><span class="line">StarRtc.StarConfig.srcServerWebrtcPort;</span><br><span class="line"><span class="comment">//vdnServer address </span></span><br><span class="line">StarRtc.StarConfig.vdnServerUrl;</span><br><span class="line"><span class="comment">//vdnServer websocket port</span></span><br><span class="line">StarRtc.StarConfig.vdnServerWebsocketPort;</span><br><span class="line"><span class="comment">//vdnServer webrtc port</span></span><br><span class="line">StarRtc.StarConfig.vdnServerWebrtcPort;</span><br><span class="line"><span class="comment">//voipServer address</span></span><br><span class="line">StarRtc.StarConfig.voipServerUrl;</span><br><span class="line"><span class="comment">//voipServer port</span></span><br><span class="line">StarRtc.StarConfig.voipServerPort;</span><br><span class="line"><span class="comment">//voipServer websocket port</span></span><br><span class="line">StarRtc.StarConfig.voipServerWebsocketPort;</span><br><span class="line"><span class="comment">//voipServer webrtc port</span></span><br><span class="line">StarRtc.StarConfig.voipServerWebrtcPort;</span><br></pre></td></tr></table></figure>
<hr>
<h2 id="5-StarRtc-StarUserInfo" class="article-heading"><a href="#5-StarRtc-StarUserInfo" class="headerlink" title="5. StarRtc.StarUserInfo"></a>5. StarRtc.StarUserInfo<a class="article-anchor" href="#5-StarRtc-StarUserInfo" aria-hidden="true"></a></h2><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">//application id</span></span><br><span class="line">StarRtc.StarUserInfo.agentId = <span class="string">""</span>;</span><br><span class="line"><span class="comment">//user id</span></span><br><span class="line">StarRtc.StarUserInfo.userId = <span class="string">""</span>;</span><br><span class="line"><span class="comment">//application id_user id</span></span><br><span class="line">StarRtc.StarUserInfo.starUid = <span class="string">""</span>;</span><br><span class="line"><span class="comment">//token</span></span><br><span class="line">StarRtc.StarUserInfo.starToken = <span class="string">""</span>;</span><br></pre></td></tr></table></figure>
<hr>
<h2 id="6-StarRtc-StarSDK" class="article-heading"><a href="#6-StarRtc-StarSDK" class="headerlink" title="6. StarRtc.StarSDK"></a>6. StarRtc.StarSDK<a class="article-anchor" href="#6-StarRtc-StarSDK" aria-hidden="true"></a></h2><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Constructor</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">StarRtc.StarSDK = <span class="function"><span class="keyword">function</span> (<span class="params"></span>)</span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Get</span> <span class="title">the</span> <span class="title">SDK</span> <span class="title">version</span> <span class="title">number</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">version</span> = <span class="title">function</span> (<span class="params"></span>)</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Set</span> <span class="title">msgServer</span> <span class="title">address</span> <span class="title">and</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">msgServerUrl</span> 					<span class="title">msgServer</span> <span class="title">address</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">msgServerWebsocketPort</span> 		<span class="title">msgServer</span> <span class="title">websocket</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">setMsgServerInfo</span> = <span class="title">function</span> (<span class="params">msgServerUrl, msgServerWebsocketPort</span>)</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Set</span> <span class="title">chatRoomServer</span> <span class="title">address</span> <span class="title">and</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">chatRoomServerUrl</span> 			<span class="title">chatRoomServer</span> <span class="title">address</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">chatRoomServerWebsocketPort</span> 	<span class="title">chatRoomServer</span> <span class="title">websocket</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">setChatRoomServerInfo</span> = <span class="title">function</span> (<span class="params">chatRoomServerUrl, chatRoomServerWebsocketPort</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Set</span> <span class="title">the</span> <span class="title">srcServer</span> <span class="title">address</span> <span class="title">and</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">srcServerUrl</span> 					<span class="title">srcServer</span> <span class="title">address</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">srcServerWebsocketPort</span> 		<span class="title">srcServer</span> <span class="title">websocket</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">srcServerWebrtcPort</span> 			<span class="title">srcServer</span> <span class="title">webrtc</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">srcServerWebrtcIP</span> 			<span class="title">srcServer</span> <span class="title">webrtc</span> <span class="title">IP</span>(<span class="params">Below chrome72 version, firefox, safari</span>)，<span class="title">optional</span>.<span class="title">If</span> <span class="title">you</span> <span class="title">do</span> <span class="title">not</span> <span class="title">fill</span> <span class="title">in</span> <span class="title">it</span>,<span class="title">the</span> <span class="title">IP</span> <span class="title">is</span> <span class="title">the</span> <span class="title">same</span> <span class="title">as</span> <span class="title">the</span> <span class="title">Server</span> <span class="title">address</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">setSrcServerInfo</span> = <span class="title">function</span> (<span class="params">srcServerUrl, srcServerWebsocketPort, srcServerWebrtcPort, srcServerWebrtcIP</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Set</span> <span class="title">the</span> <span class="title">vdnServer</span> <span class="title">address</span> <span class="title">and</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">vdnServerUrl</span> 					<span class="title">vdnServer</span> <span class="title">address</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">vdnServerWebsocketPort</span> 		<span class="title">vdnServer</span> <span class="title">websocket</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">vdnServerWebrtcPort</span> 			<span class="title">vdnServer</span> <span class="title">webrtc</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">vdnServerWebrtcIP</span> 			<span class="title">vdnServer</span> <span class="title">webrtc</span> <span class="title">IP</span>(<span class="params">Below chrome72 version, firefox, safari</span>)，<span class="title">optional</span>.<span class="title">If</span> <span class="title">you</span> <span class="title">do</span> <span class="title">not</span> <span class="title">fill</span> <span class="title">in</span> <span class="title">it</span>,<span class="title">the</span> <span class="title">IP</span> <span class="title">is</span> <span class="title">the</span> <span class="title">same</span> <span class="title">as</span> <span class="title">the</span> <span class="title">Server</span> <span class="title">address</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">setVdnServerInfo</span> = <span class="title">function</span> (<span class="params">vdnServerUrl, vdnServerWebsocketPort, vdnServerWebrtcPort, vdnServerWebrtcIP</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Set</span> <span class="title">voipServer</span> <span class="title">address</span> <span class="title">and</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">voipServerUrl</span> 				<span class="title">voipServer</span> <span class="title">address</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">voipServerPort</span> 				<span class="title">voipServer</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">voipServerWebsocketPort</span> 		<span class="title">voipServer</span> <span class="title">websocket</span>  <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">voipServerWebrtcPort</span> 			<span class="title">voipServer</span> <span class="title">webrtc</span> <span class="title">port</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">voipServerWebrtcIP</span> 			<span class="title">voipServer</span> <span class="title">webrtc</span> <span class="title">IP</span>(<span class="params">Below chrome72 version, firefox, safari</span>)，<span class="title">optional</span>.<span class="title">If</span> <span class="title">you</span> <span class="title">do</span> <span class="title">not</span> <span class="title">fill</span> <span class="title">in</span> <span class="title">it</span>,<span class="title">the</span> <span class="title">IP</span> <span class="title">is</span> <span class="title">the</span> <span class="title">same</span> <span class="title">as</span> <span class="title">the</span> <span class="title">Server</span> <span class="title">address</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">setVoipServerInfo</span> = <span class="title">function</span> (<span class="params">voipServerUrl, voipServerPort, voipServerWebsocketPort, voipServerWebrtcPort, voipServerWebrtcIP</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Set</span> <span class="title">whether</span> <span class="title">to</span> <span class="title">enable</span> <span class="title">AEC</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">flag</span> 							<span class="title">Enable</span> <span class="title">flag</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">setConfigUseAEC</span> = <span class="title">function</span> (<span class="params">flag</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Login</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_agentId</span> 						<span class="title">application</span> <span class="title">id</span>（<span class="title">It</span> <span class="title">is</span>  <span class="title">meaningless</span> <span class="title">in</span> <span class="title">private</span> <span class="title">deployment</span>, <span class="title">which</span> <span class="title">can</span> <span class="title">be</span> ""）</span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_userId</span> 						<span class="title">user</span> <span class="title">id</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_callback</span> 					<span class="title">result</span> <span class="title">callback</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">login</span> = <span class="title">function</span> (<span class="params">_agentId, _userId, _callback</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">log</span> <span class="title">out</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">logout</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">a</span> <span class="title">chat</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_targetId</span> 					<span class="title">userId</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_digest</span> 						<span class="title">digest</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_txt</span> 							<span class="title">text</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_type</span> 						<span class="title">message</span> <span class="title">type</span>（<span class="title">optional</span>）</span></span><br><span class="line"><span class="function"> */	</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">sendSingleMsg</span> = <span class="title">function</span> (<span class="params">_targetId, _digest, _txt, _type</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">a</span> <span class="title">group</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_targetGroupId</span> 			    <span class="title">group</span> <span class="title">id</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_digest</span> 						<span class="title">digest</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_txt</span> 							<span class="title">text</span></span></span><br><span class="line"><span class="function"> */	</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">sendGroupMsg</span> = <span class="title">function</span> (<span class="params">_targetGroupId, _digest, _txt</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">voip</span> <span class="title">control</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_targetId</span>	<span class="title">target</span> <span class="title">Id</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_code</span>		<span class="title">code</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">sendVoipCtrlMsg</span> = <span class="title">function</span> (<span class="params">_targetId, _code</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">voip</span> <span class="title">call</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_targetId</span>						<span class="title">target</span> <span class="title">user</span> <span class="title">Id</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_ts</span>							<span class="title">Timestamp</span> (<span class="params">optional</span>)</span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_flag</span>							<span class="title">Whether</span> <span class="title">it</span> <span class="title">is</span> <span class="title">an</span> <span class="title">audio</span> <span class="title">call</span>, <span class="title">the</span> <span class="title">default</span> <span class="title">flag</span> <span class="title">is</span> <span class="title">false</span> (<span class="params">optional</span>)</span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">sendVoipCallMsg</span> = <span class="title">function</span> (<span class="params">_targetId, _ts, _flag</span>)</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">voip</span> <span class="title">refuse</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_targetId</span>						<span class="title">target</span> <span class="title">user</span> <span class="title">Id</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">sendVoipRefuseMsg</span> = <span class="title">function</span> (<span class="params">_targetId</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">voip</span> <span class="title">hang</span> <span class="title">up</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_targetId</span>						<span class="title">target</span> <span class="title">user</span> <span class="title">Id</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">sendVoipHungupMsg</span> = <span class="title">function</span> (<span class="params">_targetId</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">voip</span> <span class="title">busy</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_targetId</span>						<span class="title">target</span> <span class="title">user</span> <span class="title">Id</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">sendVoipBusyMsg</span> = <span class="title">function</span> (<span class="params">_targetId</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">voip</span> <span class="title">message</span> <span class="title">of</span> <span class="title">agreeing</span> <span class="title">to</span> <span class="title">connect</span> </span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_targetId</span>						<span class="title">target</span> <span class="title">user</span> <span class="title">Id</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">sendVoipConnectMsg</span> = <span class="title">function</span> (<span class="params">_targetId</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Set</span> <span class="title">the</span> <span class="title">callback</span> <span class="title">to</span> <span class="title">take</span> <span class="title">over</span> <span class="title">the</span> <span class="title">onVoipMessage</span> <span class="title">section</span> <span class="title">of</span> <span class="title">the</span> <span class="title">login</span> <span class="title">callback</span> <span class="title">which</span> <span class="title">be</span> <span class="title">set</span> <span class="title">in</span> <span class="title">the</span> <span class="title">login</span> <span class="title">method</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_callback</span>						<span class="title">callback</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">setIMExtraback</span> = <span class="title">function</span> (<span class="params">_callback</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">a</span> <span class="title">video</span> <span class="title">meeting</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_oper</span>							<span class="title">Operation</span> <span class="title">type</span>: <span class="title">new</span>: <span class="title">create</span>, <span class="title">open</span>: <span class="title">join</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_userCallback</span>					<span class="title">callback</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_userData</span>						<span class="title">Store</span> <span class="title">information</span> <span class="title">about</span> <span class="title">the</span> <span class="title">video</span> <span class="title">meeting</span> <span class="title">room</span>（<span class="title">id</span>，<span class="title">name</span>，<span class="title">creator</span>），<span class="title">and</span> <span class="title">the</span> <span class="title">structure</span> <span class="title">is</span></span>&#123;<span class="string">"roomInfo"</span>:&#123;<span class="string">"id"</span>:<span class="string">""</span>, <span class="string">"name"</span>:<span class="string">""</span>, <span class="string">"creator"</span>:<span class="string">""</span>&#125;&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.getVideoMeetingRoomSDK = function (_oper, _userCallback, _userData) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Create a live room</span><br><span class="line"> * @param _type							Type: vdn, viewer; src, uploader</span><br><span class="line"> * @param _oper							Operation type: <span class="keyword">new</span>: create, <span class="attr">open</span>: join</span><br><span class="line"> * @param _userCallback					callback</span><br><span class="line"> * @param _userData						Store information about the live room（id，name，creator），and the structure is&#123;<span class="string">"roomInfo"</span>:&#123;<span class="string">"id"</span>:<span class="string">""</span>, <span class="string">"name"</span>:<span class="string">""</span>, <span class="string">"creator"</span>:<span class="string">""</span>&#125;&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.getVideoLiveRoomSDK = function (_type, _oper, _userCallback, _userData) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Create a voip room</span><br><span class="line"> * @param _oper							Operation type: call, caller; response, responder</span><br><span class="line"> * @param _userCallback					callback</span><br><span class="line"> * @param _userData						Store the other party id information，and the structure is&#123;<span class="string">"roomInfo"</span>:&#123;<span class="string">"targetId"</span>:the other party id, <span class="string">"audioOnly"</span>:Whether only has audio chat（The parameter can not be passed <span class="keyword">in</span>, the <span class="keyword">default</span> value is <span class="literal">false</span>: video chat）&#125;&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.getVoipRoomSDK = function (_oper, _userCallback, _userData) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Create a chat room</span><br><span class="line"> * @param _oper							Operation type: <span class="keyword">new</span>: create, <span class="attr">open</span>: join</span><br><span class="line"> * @param _userCallback					callback</span><br><span class="line"> * @param _userData						Store information about the chat room（id，name，creator），and the structure is&#123;<span class="string">"roomInfo"</span>:&#123;<span class="string">"id"</span>:<span class="string">""</span>, <span class="string">"name"</span>:<span class="string">""</span>, <span class="string">"creator"</span>:<span class="string">""</span>&#125;&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.getChatRoomSDK = function (_oper, _userCallback, _userData) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Create a video room (video only, no chat room)</span><br><span class="line"> * @param _type						Type: vdn, viewer; src, uploader</span><br><span class="line"> * @param _oper						Operation type: <span class="keyword">new</span>: create, <span class="attr">open</span>: join</span><br><span class="line"> * @param _userCallback				callback</span><br><span class="line"> * @param _userData					Store information about the video room（id，name，creator），and the structure is &#123;<span class="string">"roomInfo"</span>:&#123;<span class="string">"id"</span>:<span class="string">""</span>, <span class="string">"name"</span>:<span class="string">""</span>, <span class="string">"creator"</span>:<span class="string">""</span>&#125;&#125;</span><br><span class="line"> * @param _liveType					room type，reference CHATROOM_LIST_TYPE</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.getVideoRoomSDK = function (_type, _oper, _userCallback, _userData, _liveType) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Query the list(Using <span class="keyword">this</span> interface <span class="keyword">for</span> demonstration without AEC)）</span><br><span class="line"> * @param listTypes						array，reference CHATROOM_LIST_TYPE</span><br><span class="line"> * @param callback						callback</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.queryRoom = function (listTypes, callback) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * <span class="built_in">Set</span> the group DND</span><br><span class="line"> * @param ignore 						True: set doing not disturb; <span class="literal">false</span>: cancel doing not disturb</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.setGroupMsgPush = function (ignore) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Remove  users <span class="keyword">of</span> the specified group </span><br><span class="line"> * @param groupId 						group ID</span><br><span class="line"> * @param removeUsers 					The user to be removed, the data type is an array</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.removeGroupUsers = function (groupId, removeUsers) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Add  users <span class="keyword">of</span> the specified group </span><br><span class="line"> * @param groupId 						group ID</span><br><span class="line"> * @param addUsers 						User to be added, the data type is an array</span><br><span class="line"> * @param userDefineData 	</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.addGroupUsers = function (groupId, addUsers, userDefineData) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Delete a specified group</span><br><span class="line"> * @param groupId 						group ID</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.delGroup = function (groupId) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Create a group</span><br><span class="line"> * @param addUsers 						User to be added, the data type is an array</span><br><span class="line"> * @param userDefineData 	</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.createGroup = function (addUsers, userDefineData) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Request to get the group list</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.getGroupList = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Request the user list <span class="keyword">of</span> a specified group </span><br><span class="line"> * @param groupId						group ID</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.getGroupUserList = function (groupId) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Request to get the current online number</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.getOnlineNumber = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Request to get the list <span class="keyword">of</span> all users </span><br><span class="line"> * @param reqPageNum					page number，After calling the StarRtc.Instance.getOnlineNumber <span class="function"><span class="keyword">function</span>, <span class="title">the</span> <span class="title">total</span> <span class="title">number</span> <span class="title">and</span> <span class="title">the</span> <span class="title">total</span> <span class="title">number</span> <span class="title">of</span> <span class="title">pages</span> <span class="title">will</span> <span class="title">be</span> <span class="title">returned</span> <span class="title">in</span> <span class="title">the</span> <span class="title">callback</span>.</span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSDK</span>.<span class="title">getAllUserList</span> = <span class="title">function</span> (<span class="params">reqPageNum</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">a</span> <span class="title">super</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_oper</span>							<span class="title">Operation</span> <span class="title">type</span>: <span class="title">new</span>, <span class="title">create</span>; <span class="title">open</span>, <span class="title">join</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_userCallback</span>					<span class="title">callback</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">_userData</span>						<span class="title">Store</span> <span class="title">information</span> <span class="title">about</span> <span class="title">the</span> <span class="title">super</span> <span class="title">room</span>（<span class="title">id</span>，<span class="title">name</span>，<span class="title">creator</span>），<span class="title">and</span> <span class="title">the</span> <span class="title">structure</span> <span class="title">is</span> </span>&#123;<span class="string">"roomInfo"</span>:&#123;<span class="string">"id"</span>:<span class="string">""</span>,  <span class="string">"name"</span>:<span class="string">""</span>, <span class="string">"creator"</span>:<span class="string">""</span>&#125;&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.getSuperRoomSDK = function (_oper, _userCallback, _userData)</span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Save room information (use <span class="keyword">this</span> interface <span class="keyword">for</span> demonstrations without AEC)</span><br><span class="line"> * @param listType						You can reference CHATROOM_LIST_TYPE to set the save type</span><br><span class="line"> * @param roomInfo						the structure is &#123;<span class="string">"id"</span>:<span class="string">""</span>, <span class="string">"name"</span>:<span class="string">""</span>, <span class="string">"creator"</span>:<span class="string">""</span>&#125;</span><br><span class="line"> * @param callback						callback</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.reportRoom = function (listType, roomInfo, callback) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Delete the room information（use <span class="keyword">this</span> interface <span class="keyword">for</span> demonstrations without AEC）</span><br><span class="line"> * @param listType						You can reference CHATROOM_LIST_TYPE to set the save type</span><br><span class="line"> * @param roomInfo						the structure is&#123;<span class="string">"id"</span>:<span class="string">""</span>, <span class="string">"name"</span>:<span class="string">""</span>, <span class="string">"creator"</span>:<span class="string">""</span>&#125;</span><br><span class="line"> * @param callback						callback</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSDK.delRoom = function (listType, roomInfo, callback)</span></span><br></pre></td></tr></table></figure>
<hr>
<h2 id="7-StarRtc-StarRoomSDK" class="article-heading"><a href="#7-StarRtc-StarRoomSDK" class="headerlink" title="7. StarRtc.StarRoomSDK"></a>7. StarRtc.StarRoomSDK<a class="article-anchor" href="#7-StarRtc-StarRoomSDK" aria-hidden="true"></a></h2><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Constructor</span></span><br><span class="line"><span class="comment"> * @param _type						Type: vdn, viewer; src, uploader</span></span><br><span class="line"><span class="comment"> * @param _oper						Operation type: new, create; open, join</span></span><br><span class="line"><span class="comment"> * @param _userCallback				callback</span></span><br><span class="line"><span class="comment"> * @param _userData					Store information about chat room（id，name，creator），and the structure is&#123;"roomInfo":&#123;"id":"", "name":"", "creator":""&#125;&#125;</span></span><br><span class="line"><span class="comment"> * @param _config					Room configuration which can not be passed in</span></span><br><span class="line"><span class="comment"> * @param _liveType					You can reference CHATROOM_LIST_TYPE to set the live type</span></span><br><span class="line"><span class="comment"> * @param _starImInterface			Set the callback to take over the onVoipMessage section of the login callback set in the login method</span></span><br><span class="line"><span class="comment"> * @param _starUser					User information（reference StarRtc.StarUserInfo）</span></span><br><span class="line"><span class="comment"> * @param _starConfig				star Configuration（reference StarRtc.StarConfig）</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">StarRtc.StarRoomSDK = <span class="function"><span class="keyword">function</span> (<span class="params">_type, _oper, _userCallback, _userData, _config, _liveType, _starImInterface, _starUser, _starConfig</span>)</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Connect</span> <span class="title">to</span>  <span class="title">the</span> <span class="title">super</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */	</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarRoomSDK</span>.<span class="title">sigConnect</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Disconnect</span> <span class="title">to</span>  <span class="title">the</span> <span class="title">super</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">flag</span>	<span class="title">The</span> <span class="title">flag</span> <span class="title">of</span> <span class="title">Whether</span> <span class="title">to</span> <span class="title">disconnect</span> <span class="title">actively</span>, <span class="title">which</span> <span class="title">is</span> <span class="title">used</span> <span class="title">to</span> <span class="title">determine</span> <span class="title">reconnection</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarRoomSDK</span>.<span class="title">sigDisconnect</span> = <span class="title">function</span> (<span class="params">_flag</span>)</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">a</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarRoomSDK</span>.<span class="title">createNew</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Delete</span> <span class="title">a</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarRoomSDK</span>.<span class="title">deleteCurrRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">a</span> <span class="title">local</span> <span class="title">video</span> <span class="title">stream</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">streamOption</span> 	<span class="title">Stream</span> <span class="title">configuration</span>（<span class="title">Resolution</span>, <span class="title">etc</span>.），<span class="title">such</span> <span class="title">as</span></span>&#123; <span class="string">"video"</span>: <span class="literal">true</span>, <span class="string">"audio"</span>: &#123; <span class="attr">deviceId</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"default"</span>] &#125; &#125; &#125;， or&#123; <span class="string">"video"</span>: &#123; <span class="attr">width</span>: &#123; <span class="attr">ideal</span>: <span class="number">640</span> &#125;, <span class="attr">height</span>: &#123; <span class="attr">ideal</span>: <span class="number">480</span> &#125;, <span class="attr">frameRate</span>: &#123; <span class="attr">ideal</span>: <span class="number">25</span> &#125;, <span class="attr">facingMode</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"user"</span>] &#125; &#125;, <span class="string">"audio"</span>: &#123; <span class="attr">deviceId</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"default"</span>] &#125; &#125;</span><br><span class="line">			&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.createStream = function (streamOption) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Create a shared screen video stream</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.createScreenCaptureStream = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> *  <span class="built_in">Set</span> the visibility <span class="keyword">of</span> the stream （It will affect both local and far peer streams）</span><br><span class="line"> * 	@param config Stream visibility configuration&#123;<span class="string">"video"</span>:<span class="literal">true</span>, <span class="string">"audio"</span>:<span class="literal">true</span>&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.publishStream = function (config)</span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * join the room</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.joinRoom = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * leave the room</span><br><span class="line"> * @param _flag		Whether to leave the roomactively（optional）</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.leaveRoom = function (_flag) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Switch the size <span class="keyword">of</span> the view</span><br><span class="line"> * @param streamConfig	Switch the configuration <span class="keyword">of</span> the size map, <span class="number">1</span> <span class="keyword">for</span> small, <span class="number">2</span> <span class="keyword">for</span> large[<span class="number">1</span>,<span class="number">2</span>,<span class="number">1</span>,<span class="number">2.</span>..]</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.streamConfigApply = function (streamConfig) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send a chat room message</span><br><span class="line"> * @param msg	message</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendChatMsg = function (msg)</span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send voip message（IM one-to-one chat message）</span><br><span class="line"> * @param msg	message</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendVoipMsg = function (msg) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send chat room private message</span><br><span class="line"> * @param toUserId	the user ID the meaasge will be sent to</span><br><span class="line"> * @param msg		message</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendChatPrivateMsg = function (userId, msg) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send the message that the audience apply to be an anchor</span><br><span class="line"> *<span class="regexp">/		</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendApplyMsg = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send the message that agree the audience apply to be an anchor</span><br><span class="line"> * @param userId 	the user ID the meaasge will be sent to</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendApplyAgreeMsg = function (userId)</span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * The creater refuses someone to be a broadcaster</span><br><span class="line"> * @param userId 	the user ID the meaasge will be sent to</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendApplyDisagreeMsg = function (userId) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * the creater invites someone to be a broadcaster</span><br><span class="line"> * @param userId 	the user ID the meaasge will be sent to</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendInviteLinkMsg = function (userId) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * The audience has agreed to be a broadcaster</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendInviteLinkAgreeMsg = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * The audience has refused to be a broadcaster</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendInviteLinkDisagreeMsg = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send the message that the creater invites someone to start to be a broadcaster</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendInviteLinkStartMsg = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send the message that the user will  be stopped to be a broadcaster</span><br><span class="line"> * @param userId 	the user ID the meaasge will be sent to</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendLinkStopMsg = function (userId) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Kick out the user</span><br><span class="line"> * @param kickOutUserId	the user ID who will be kicked out</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.kickOutUser = function (kickOutUserId)</span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Speaking not allowed <span class="keyword">in</span> the room</span><br><span class="line"> * @param banUserId    the user ID <span class="keyword">of</span> who is speaking not allowed </span><br><span class="line"> * @param banTime    the time duration <span class="keyword">of</span> speaking not allowed</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.banToSendMsg = function (banUserId, banTime)</span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Get the number <span class="keyword">of</span> online users <span class="keyword">in</span> the chat room </span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.getRoomOnlineNum = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send real-time data</span><br><span class="line"> * @param data	real-time data</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.sendStreamData = function (data) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Get the disconnect satus:active or passive?</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarRoomSDK.activeDisconnect = function ()</span></span><br></pre></td></tr></table></figure>
<hr>
<h2 id="8-StarRtc-StarSuperRoomSDK" class="article-heading"><a href="#8-StarRtc-StarSuperRoomSDK" class="headerlink" title="8. StarRtc.StarSuperRoomSDK"></a>8. StarRtc.StarSuperRoomSDK<a class="article-anchor" href="#8-StarRtc-StarSuperRoomSDK" aria-hidden="true"></a></h2><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Constructor</span></span><br><span class="line"><span class="comment"> * @param _oper						Operation type: new, create; open, join</span></span><br><span class="line"><span class="comment"> * @param _userCallback				callback</span></span><br><span class="line"><span class="comment"> * @param _userData					Store information about the chat room（id，name，creator），and the structure is&#123;"roomInfo":&#123;"id":"", "name":"", "creator":""&#125;&#125;</span></span><br><span class="line"><span class="comment"> * @param _starUser					User Info（见StarRtc.StarUserInfo）</span></span><br><span class="line"><span class="comment"> * @param _starConfig				Star configuration（Reference StarRtc.StarConfig）</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">StarRtc.StarSuperRoomSDK = <span class="function"><span class="keyword">function</span> (<span class="params">_oper, _userCallback, _userData, _starUser, _starConfig</span>)</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Connect</span> <span class="title">to</span> <span class="title">the</span> <span class="title">super</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSuperRoomSDK</span>.<span class="title">sigConnect</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Disconnect</span> <span class="title">to</span>  <span class="title">the</span> <span class="title">super</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">flag</span>	<span class="title">The</span> <span class="title">flag</span> <span class="title">of</span> <span class="title">Whether</span> <span class="title">to</span> <span class="title">disconnect</span> <span class="title">actively</span>, <span class="title">which</span> <span class="title">is</span> <span class="title">used</span> <span class="title">to</span> <span class="title">determine</span> <span class="title">reconnection</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSuperRoomSDK</span>.<span class="title">sigDisconnect</span> = <span class="title">function</span> (<span class="params">_flag</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">a</span> <span class="title">new</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSuperRoomSDK</span>.<span class="title">createNew</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Delete</span> <span class="title">the</span> <span class="title">current</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarSuperRoomSDK</span>.<span class="title">deleteCurrRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">streamOption</span> 	<span class="title">Stream</span> <span class="title">configuration</span>（<span class="title">Resolution</span>, <span class="title">etc</span>.），<span class="title">such</span> <span class="title">as</span></span>&#123; <span class="string">"video"</span>: <span class="literal">true</span>, <span class="string">"audio"</span>: &#123; <span class="attr">deviceId</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"default"</span>] &#125; &#125; &#125;， or&#123; <span class="string">"video"</span>: &#123; <span class="attr">width</span>: &#123; <span class="attr">ideal</span>: <span class="number">640</span> &#125;, <span class="attr">height</span>: &#123; <span class="attr">ideal</span>: <span class="number">480</span> &#125;, <span class="attr">frameRate</span>: &#123; <span class="attr">ideal</span>: <span class="number">25</span> &#125;, <span class="attr">facingMode</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"user"</span>] &#125; &#125;, <span class="string">"audio"</span>: &#123; <span class="attr">deviceId</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"default"</span>] &#125; &#125;</span><br><span class="line">			&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSuperRoomSDK.createStream = function (streamOption) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Join the room</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSuperRoomSDK.joinRoom = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Leave the room</span><br><span class="line"> * @param _flag		Whether to leave actively（optional）</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSuperRoomSDK.leaveRoom = function (_flag) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send chat room message</span><br><span class="line"> * @param msg	message</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSuperRoomSDK.sendChatMsg = function (msg) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send chat room private message</span><br><span class="line"> * @param toUserId    the user ID the meaasge will be sent to</span><br><span class="line"> * @param msg        message</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSuperRoomSDK.sendChatPrivateMsg = function (userId, msg) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * kick out the user</span><br><span class="line"> * @param kickOutUserId	the user ID who will be kicked out</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSuperRoomSDK.kickOutUser = function (kickOutUserId) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Speaking not allowed <span class="keyword">in</span> the room</span><br><span class="line"> * @param banUserId    the user ID <span class="keyword">of</span> who is speaking not allowed </span><br><span class="line"> * @param banTime    the time duration <span class="keyword">of</span> speaking not allowed</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSuperRoomSDK.banToSendMsg = function (banUserId, banTime) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Get the number <span class="keyword">of</span> online users <span class="keyword">in</span> the chat room </span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSuperRoomSDK.getRoomOnlineNum = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Get the disconnect satus:active or passive?</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSuperRoomSDK.activeDisconnect = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Start the intercom</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSuperRoomSDK.startTalk = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * End the intercom</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarSuperRoomSDK.endTalk = function ()</span></span><br></pre></td></tr></table></figure>
<hr>
<h2 id="9-StarRtc-StarChatRoomSDK" class="article-heading"><a href="#9-StarRtc-StarChatRoomSDK" class="headerlink" title="9. StarRtc.StarChatRoomSDK"></a>9. StarRtc.StarChatRoomSDK<a class="article-anchor" href="#9-StarRtc-StarChatRoomSDK" aria-hidden="true"></a></h2><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Constructor</span></span><br><span class="line"><span class="comment"> * @param _oper						Operation type: new, create; open, join</span></span><br><span class="line"><span class="comment"> * @param _userCallback				callback</span></span><br><span class="line"><span class="comment"> * @param _userData					Store information about the chat room（id，name，creator），and the structure is&#123;"roomInfo":&#123;"id":"", "name":"", "creator":""&#125;&#125;</span></span><br><span class="line"><span class="comment"> * @param _starUser					User Info（见StarRtc.StarUserInfo）</span></span><br><span class="line"><span class="comment"> * @param _starConfig				Star configuration（Reference StarRtc.StarConfig）</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">StarRtc.StarChatRoomSDK = <span class="function"><span class="keyword">function</span> (<span class="params">_oper, _userCallback, _userData, _liveType, _starUser, _starConfig</span>)</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Connect</span> <span class="title">to</span>  <span class="title">the</span>  <span class="title">room</span></span></span><br><span class="line"><span class="function"> */	</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">sigConnect</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Disconnect</span> <span class="title">to</span>  <span class="title">the</span>  <span class="title">room</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">flag</span>	<span class="title">The</span> <span class="title">flag</span> <span class="title">of</span> <span class="title">Whether</span> <span class="title">to</span> <span class="title">disconnect</span> <span class="title">actively</span>, <span class="title">which</span> <span class="title">is</span> <span class="title">used</span> <span class="title">to</span> <span class="title">determine</span> <span class="title">reconnection</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">sigDisconnect</span> = <span class="title">function</span> (<span class="params">_flag</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">create</span> <span class="title">a</span> <span class="title">new</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">createNew</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">the</span> <span class="title">chat</span> <span class="title">room</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">msg</span>	<span class="title">message</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">sendChatMsg</span> = <span class="title">function</span> (<span class="params">msg</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">chat</span> <span class="title">room</span> <span class="title">private</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">toUserId</span>	<span class="title">the</span> <span class="title">user</span> <span class="title">ID</span> <span class="title">the</span> <span class="title">meaasge</span> <span class="title">will</span> <span class="title">be</span> <span class="title">sent</span> <span class="title">to</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">msg</span>		<span class="title">message</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">sendChatPrivateMsg</span> = <span class="title">function</span> (<span class="params">toUserId, msg</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">chat</span> <span class="title">room</span> <span class="title">private</span> <span class="title">chat</span> <span class="title">control</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">toUserId</span>	<span class="title">The</span> <span class="title">message</span> <span class="title">who</span> <span class="title">will</span> <span class="title">be</span> <span class="title">sent</span> <span class="title">to</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">msg</span>		<span class="title">meesage</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">code</span>		<span class="title">control</span> <span class="title">code</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">sendChatCtrlPrivateMsg</span> = <span class="title">function</span> (<span class="params">toUserId, msg, code</span>)</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">kick</span> <span class="title">out</span> <span class="title">the</span> <span class="title">user</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">kickOutUserId</span>    <span class="title">the</span> <span class="title">user</span> <span class="title">ID</span> <span class="title">who</span> <span class="title">will</span> <span class="title">be</span> <span class="title">kicked</span> <span class="title">out</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">kickOutUser</span> = <span class="title">function</span> (<span class="params">kickOutUserId</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Speaking</span> <span class="title">not</span> <span class="title">allowed</span> <span class="title">in</span> <span class="title">the</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">banUserId</span>    <span class="title">the</span> <span class="title">user</span> <span class="title">ID</span> <span class="title">of</span> <span class="title">who</span> <span class="title">is</span> <span class="title">speaking</span> <span class="title">not</span> <span class="title">allowed</span> </span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">banTime</span>    <span class="title">the</span> <span class="title">time</span> <span class="title">duration</span> <span class="title">of</span> <span class="title">speaking</span> <span class="title">not</span> <span class="title">allowed</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">banToSendMsg</span> = <span class="title">function</span> (<span class="params">banUserId, banTime</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Get</span> <span class="title">the</span> <span class="title">number</span> <span class="title">of</span> <span class="title">online</span> <span class="title">users</span> <span class="title">in</span> <span class="title">the</span> <span class="title">chat</span> <span class="title">room</span> </span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">getRoomOnlineNum</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Delete</span> <span class="title">the</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">deleteCurrRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Join</span> <span class="title">the</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">joinRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Leave</span> <span class="title">the</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">leaveRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Get</span> <span class="title">the</span> <span class="title">disconnect</span> <span class="title">satus</span>:<span class="title">active</span> <span class="title">or</span> <span class="title">passive</span>?</span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatRoomSDK</span>.<span class="title">activeDisconnect</span> = <span class="title">function</span> (<span class="params"></span>)</span></span><br></pre></td></tr></table></figure>
<hr>
<h2 id="10-StarRtc-StarVideoRoomSDK" class="article-heading"><a href="#10-StarRtc-StarVideoRoomSDK" class="headerlink" title="10. StarRtc.StarVideoRoomSDK"></a>10. StarRtc.StarVideoRoomSDK<a class="article-anchor" href="#10-StarRtc-StarVideoRoomSDK" aria-hidden="true"></a></h2><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Constructor</span></span><br><span class="line"><span class="comment"> * @param _type						Type: vdn, viewer; src, uploader</span></span><br><span class="line"><span class="comment"> * @param _oper						Operation type: new, create; open, join</span></span><br><span class="line"><span class="comment"> * @param _userCallback				callback</span></span><br><span class="line"><span class="comment"> * @param _userData					Store information about chat room（id，name，creator），and the structure is&#123;"roomInfo":&#123;"id":"", "name":"", "creator":""&#125;&#125;</span></span><br><span class="line"><span class="comment"> * @param _liveType					You can reference CHATROOM_LIST_TYPE to set the live type</span></span><br><span class="line"><span class="comment"> * @param _starUser					User information（reference StarRtc.StarUserInfo）</span></span><br><span class="line"><span class="comment"> * @param _starConfig				star Configuration（reference StarRtc.StarConfig）</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">StarRtc.StarVideoRoomSDK = <span class="function"><span class="keyword">function</span> (<span class="params">_type, _oper, _userCallback, _userData, _liveType, _starUser, _starConfig</span>)</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Connect</span> <span class="title">to</span> <span class="title">the</span> <span class="title">video</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */		</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarVideoRoomSDK</span>.<span class="title">sigConnect</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Disconnect</span> <span class="title">to</span>  <span class="title">the</span>  <span class="title">room</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">flag</span>	<span class="title">The</span> <span class="title">flag</span> <span class="title">of</span> <span class="title">Whether</span> <span class="title">to</span> <span class="title">disconnect</span> <span class="title">actively</span>, <span class="title">which</span> <span class="title">is</span> <span class="title">used</span> <span class="title">to</span> <span class="title">determine</span> <span class="title">reconnection</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarVideoRoomSDK</span>.<span class="title">sigDisconnect</span> = <span class="title">function</span> (<span class="params">_flag</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">the</span> <span class="title">video</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarVideoRoomSDK</span>.<span class="title">createNew</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">the</span> <span class="title">New</span> <span class="title">super</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarVideoRoomSDK</span>.<span class="title">createNewSuperRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">delete</span> <span class="title">the</span> <span class="title">current</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarVideoRoomSDK</span>.<span class="title">deleteCurrRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">a</span> <span class="title">local</span> <span class="title">video</span> <span class="title">stream</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">streamOption</span> 	<span class="title">Stream</span> <span class="title">configuration</span>（<span class="title">Resolution</span>, <span class="title">etc</span>.），<span class="title">such</span> <span class="title">as</span></span>&#123; <span class="string">"video"</span>: <span class="literal">true</span>, <span class="string">"audio"</span>: &#123; <span class="attr">deviceId</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"default"</span>] &#125; &#125; &#125;， or&#123; <span class="string">"video"</span>: &#123; <span class="attr">width</span>: &#123; <span class="attr">ideal</span>: <span class="number">640</span> &#125;, <span class="attr">height</span>: &#123; <span class="attr">ideal</span>: <span class="number">480</span> &#125;, <span class="attr">frameRate</span>: &#123; <span class="attr">ideal</span>: <span class="number">25</span> &#125;, <span class="attr">facingMode</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"user"</span>] &#125; &#125;, <span class="string">"audio"</span>: &#123; <span class="attr">deviceId</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"default"</span>] &#125; &#125;</span><br><span class="line">			&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoRoomSDK.createStream = function (streamOption) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Create a shared screen video stream</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoRoomSDK.createScreenCaptureStream = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> *  <span class="built_in">Set</span> the visibility <span class="keyword">of</span> the stream （It will affect both local and far peer streams）</span><br><span class="line"> * 	@param config Stream visibility configuration&#123;<span class="string">"video"</span>:<span class="literal">true</span>, <span class="string">"audio"</span>:<span class="literal">true</span>&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoRoomSDK.publishStream = function (config)</span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Join the room</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoRoomSDK.joinRoom = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Leave the room</span><br><span class="line"> * @param _flag		Whether to leave actively（optional））</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoRoomSDK.leaveRoom = function (flag) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Switch the size <span class="keyword">of</span> the view</span><br><span class="line"> * @param streamConfig	Switch the configuration <span class="keyword">of</span> the size map, <span class="number">1</span> <span class="keyword">for</span> small, <span class="number">2</span> <span class="keyword">for</span> large[<span class="number">1</span>,<span class="number">2</span>,<span class="number">1</span>,<span class="number">2.</span>..]</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoRoomSDK.streamConfigApply = function (streamConfig) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send real-time data</span><br><span class="line"> * @param data	real time data</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoRoomSDK.sendStreamData = function (data) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Get the disconnect satus:active or passive?</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoRoomSDK.activeDisconnect = function ()</span></span><br></pre></td></tr></table></figure>
<hr>
<h2 id="11-StarRtc-StarVideoSDK" class="article-heading"><a href="#11-StarRtc-StarVideoSDK" class="headerlink" title="11. StarRtc.StarVideoSDK"></a>11. StarRtc.StarVideoSDK<a class="article-anchor" href="#11-StarRtc-StarVideoSDK" aria-hidden="true"></a></h2><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Constructor</span></span><br><span class="line"><span class="comment"> * @param _type                        Type: vdn, viewer; src, uploader</span></span><br><span class="line"><span class="comment"> * @param _oper                        Operation type: new, create; open, join</span></span><br><span class="line"><span class="comment"> * @param _userCallback                callback</span></span><br><span class="line"><span class="comment"> * @param _userData                    Store information about chat room（id，name，creator），and the structure is&#123;"roomInfo":&#123;"id":"", "name":"", "creator":""&#125;&#125;</span></span><br><span class="line"><span class="comment"> * @param _config                    Room configuration which can not be passed in</span></span><br><span class="line"><span class="comment"> * @param _liveType                    You can reference CHATROOM_LIST_TYPE to set the live type</span></span><br><span class="line"><span class="comment"> * @param _starUser                    User information（reference StarRtc.StarUserInfo）</span></span><br><span class="line"><span class="comment"> * @param _starConfig                star Configuration（reference StarRtc.StarConfig）</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">StarRtc.StarVideoSDK = <span class="function"><span class="keyword">function</span> (<span class="params">_type, _operfunction (_type, _oper, _userCallbackfunction (_type, _operfunction (_type, _oper, _userCallback, _userData, _liveType, _starUser, _starConfig</span>)</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Connect</span> <span class="title">to</span> <span class="title">the</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */		</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarVideoSDK</span>.<span class="title">sigConnect</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Disconnect</span> <span class="title">to</span>  <span class="title">the</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">flag</span>	<span class="title">The</span> <span class="title">flag</span> <span class="title">of</span> <span class="title">Whether</span> <span class="title">to</span> <span class="title">disconnect</span> <span class="title">actively</span>, <span class="title">which</span> <span class="title">is</span> <span class="title">used</span> <span class="title">to</span> <span class="title">determine</span> <span class="title">reconnection</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarVideoSDK</span>.<span class="title">sigDisconnect</span> = <span class="title">function</span> (<span class="params">_flag</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">a</span> <span class="title">new</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarVideoSDK</span>.<span class="title">createNew</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">a</span> <span class="title">new</span> <span class="title">super</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarVideoSDK</span>.<span class="title">createNewSuperRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Delete</span> <span class="title">the</span> <span class="title">current</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarVideoSDK</span>.<span class="title">deleteCurrRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">a</span> <span class="title">local</span> <span class="title">video</span> <span class="title">stream</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">streamOption</span> 	<span class="title">Stream</span> <span class="title">configuration</span>（<span class="title">Resolution</span>, <span class="title">etc</span>.），<span class="title">such</span> <span class="title">as</span></span>&#123; <span class="string">"video"</span>: <span class="literal">true</span>, <span class="string">"audio"</span>: &#123; <span class="attr">deviceId</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"default"</span>] &#125; &#125; &#125;， or&#123; <span class="string">"video"</span>: &#123; <span class="attr">width</span>: &#123; <span class="attr">ideal</span>: <span class="number">640</span> &#125;, <span class="attr">height</span>: &#123; <span class="attr">ideal</span>: <span class="number">480</span> &#125;, <span class="attr">frameRate</span>: &#123; <span class="attr">ideal</span>: <span class="number">25</span> &#125;, <span class="attr">facingMode</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"user"</span>] &#125; &#125;, <span class="string">"audio"</span>: &#123; <span class="attr">deviceId</span>: &#123; <span class="attr">ideal</span>: [<span class="string">"default"</span>] &#125; &#125;</span><br><span class="line">			&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoSDK.createStream = function (streamOption) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Create a shared screen video stream</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoSDK.createScreenCaptureStream = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> *  <span class="built_in">Set</span> the visibility <span class="keyword">of</span> the stream （It will affect both local and far peer streams）</span><br><span class="line"> * 	@param config Stream visibility configuration&#123;<span class="string">"video"</span>:<span class="literal">true</span>, <span class="string">"audio"</span>:<span class="literal">true</span>&#125;</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoSDK.publishStream = function (config)</span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Join the room</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoSDK.joinRoom = function () </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Leave the room</span><br><span class="line"> * @param _flag        Whether to leave actively（optional）</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoSDK.leaveRoom = function (flag) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Switch the size <span class="keyword">of</span> the view</span><br><span class="line"> * @param streamConfig	Switch the configuration <span class="keyword">of</span> the size map, <span class="number">1</span> <span class="keyword">for</span> small, <span class="number">2</span> <span class="keyword">for</span> large[<span class="number">1</span>,<span class="number">2</span>,<span class="number">1</span>,<span class="number">2.</span>..]</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoSDK.strestreamConfigApplyamConfigApply = function (streamConfig) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Send real-time data</span><br><span class="line"> * @param data	 real-time data</span><br><span class="line"> *<span class="regexp">/	</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoSDK.sendStreamData = function (data) </span></span><br><span class="line"><span class="regexp"></span></span><br><span class="line"><span class="regexp">/</span>**</span><br><span class="line"> * Get the disconnect satus:active or passive?</span><br><span class="line"> *<span class="regexp">/</span></span><br><span class="line"><span class="regexp">StarRtc.StarVideoSDK.activeDisconnect = function ()</span></span><br></pre></td></tr></table></figure>
<hr>
<h2 id="12-StarRtc-StarChatSDK" class="article-heading"><a href="#12-StarRtc-StarChatSDK" class="headerlink" title="12. StarRtc.StarChatSDK"></a>12. StarRtc.StarChatSDK<a class="article-anchor" href="#12-StarRtc-StarChatSDK" aria-hidden="true"></a></h2><figure class="highlight js"><table><tr><td class="code"><pre><span class="line"><span class="comment">/**</span></span><br><span class="line"><span class="comment"> * Constructor</span></span><br><span class="line"><span class="comment"> * @param _oper						Operation type: new, create; open, join</span></span><br><span class="line"><span class="comment"> * @param _userCallback				callback</span></span><br><span class="line"><span class="comment"> * @param _userData					Store information about the chat room（id，name，creator），and the structure is&#123;"roomInfo":&#123;"id":"", "name":"", "creator":""&#125;&#125;</span></span><br><span class="line"><span class="comment"> * @param _starUser					User Info（见StarRtc.StarUserInfo）</span></span><br><span class="line"><span class="comment"> * @param _starConfig				Star configuration（Reference StarRtc.StarConfig）</span></span><br><span class="line"><span class="comment"> */</span></span><br><span class="line">StarRtc.StarChatSDK = <span class="function"><span class="keyword">function</span> (<span class="params">_operfunction (_oper, _userCallback, _userData, _liveType, _starUser, _starConfig</span>)</span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Coonect</span> <span class="title">to</span> <span class="title">the</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */	</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">sigConnect</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Disconnect</span> <span class="title">to</span>  <span class="title">the</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">flag</span>	<span class="title">The</span> <span class="title">flag</span> <span class="title">of</span> <span class="title">Whether</span> <span class="title">to</span> <span class="title">disconnect</span> <span class="title">actively</span>, <span class="title">which</span> <span class="title">is</span> <span class="title">used</span> <span class="title">to</span> <span class="title">determine</span> <span class="title">reconnection</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">sigdisconnect</span> = <span class="title">function</span> (<span class="params">_flag</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Create</span> <span class="title">a</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">createNew</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">chat</span> <span class="title">room</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">msg</span>	<span class="title">message</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">sendChatMsg</span> = <span class="title">function</span> (<span class="params">msg</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">chat</span> <span class="title">room</span> <span class="title">private</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">toUserId</span>	<span class="title">the</span> <span class="title">user</span> <span class="title">ID</span> <span class="title">the</span> <span class="title">meaasge</span> <span class="title">will</span> <span class="title">be</span> <span class="title">sent</span> <span class="title">to</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">msg</span>		<span class="title">message</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">sendChatPrivateMsg</span> = <span class="title">function</span> (<span class="params">toUserId, msg</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Send</span> <span class="title">chat</span> <span class="title">room</span> <span class="title">private</span> <span class="title">chat</span> <span class="title">control</span> <span class="title">message</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">toUserId</span>	<span class="title">The</span> <span class="title">message</span> <span class="title">who</span> <span class="title">will</span> <span class="title">be</span> <span class="title">sent</span> <span class="title">to</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">msg</span>		<span class="title">meesage</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">code</span>		<span class="title">control</span> <span class="title">code</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">sendChatCtrlPrivateMsg</span> = <span class="title">function</span> (<span class="params">toUserId, msg, code</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">kick</span> <span class="title">out</span> <span class="title">the</span> <span class="title">user</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">kickOutUserId</span>	<span class="title">the</span> <span class="title">user</span> <span class="title">ID</span> <span class="title">who</span> <span class="title">will</span> <span class="title">be</span> <span class="title">kicked</span> <span class="title">out</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">kickOutUser</span> = <span class="title">function</span> (<span class="params">kickOutUserId</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Speaking</span> <span class="title">not</span> <span class="title">allowed</span> <span class="title">in</span> <span class="title">the</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">banUserId</span>	<span class="title">the</span> <span class="title">user</span> <span class="title">ID</span> <span class="title">of</span> <span class="title">who</span> <span class="title">is</span> <span class="title">speaking</span> <span class="title">not</span> <span class="title">allowed</span> </span></span><br><span class="line"><span class="function"> * @<span class="title">param</span> <span class="title">banTime</span>	<span class="title">the</span> <span class="title">time</span> <span class="title">duration</span> <span class="title">of</span> <span class="title">speaking</span> <span class="title">not</span> <span class="title">allowed</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">banToSendMsg</span> = <span class="title">function</span> (<span class="params">banUserId, banTime</span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Get</span> <span class="title">the</span> <span class="title">number</span> <span class="title">of</span> <span class="title">online</span> <span class="title">users</span> <span class="title">in</span> <span class="title">the</span> <span class="title">chat</span> <span class="title">room</span> </span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">getRoomOnlineNum</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Delete</span> <span class="title">the</span> <span class="title">current</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">deleteCurrRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Join</span> <span class="title">the</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">joinRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">leave</span> <span class="title">the</span> <span class="title">room</span></span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">leaveRoom</span> = <span class="title">function</span> (<span class="params"></span>) </span></span><br><span class="line"><span class="function"></span></span><br><span class="line"><span class="function">/**</span></span><br><span class="line"><span class="function"> * <span class="title">Get</span> <span class="title">the</span> <span class="title">disconnect</span> <span class="title">satus</span>:<span class="title">active</span> <span class="title">or</span> <span class="title">passive</span>?</span></span><br><span class="line"><span class="function"> */</span></span><br><span class="line"><span class="function"><span class="title">StarRtc</span>.<span class="title">StarChatSDK</span>.<span class="title">activeDisconnect</span> = <span class="title">function</span> (<span class="params"></span>)</span></span><br></pre></td></tr></table></figure>
<hr>

              </div>
              <footer class="article-footer">
                <time class="article-footer-updated" datetime="2020-09-06T00:27:31.352Z" itemprop="dateModified">Last updated<script type="text/javascript">document.write("："+(new Date()).toISOString().slice(0,10))</script></time>
		<a href="web-1.html" class="article-footer-prev" title="1.prerequisite"><i class="fa fa-chevron-left"></i><span>Prev</span></a><a href="web-4.html" class="article-footer-next" title="4.im"><span>Next</span><i class="fa fa-chevron-right"></i></a>
              </footer>
            </div>
          </div>
          <aside id="article-toc" role="navigation">
            <div id="article-toc-inner">
              <strong class="sidebar-title">Contents</strong>
              <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#SDK-description-and-api-introduction"><span class="toc-text">SDK description and api introduction</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#1-Basic-instructions-of-the-SDK"><span class="toc-text">1. Basic instructions of the SDK</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#2-LOG-LEVEL"><span class="toc-text">2. LOG_LEVEL</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#3-CHATROOM-LIST-TYPE"><span class="toc-text">3. CHATROOM_LIST_TYPE</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#4-StarRtc-StarConfig"><span class="toc-text">4. StarRtc.StarConfig</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#5-StarRtc-StarUserInfo"><span class="toc-text">5. StarRtc.StarUserInfo</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#6-StarRtc-StarSDK"><span class="toc-text">6. StarRtc.StarSDK</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#7-StarRtc-StarRoomSDK"><span class="toc-text">7. StarRtc.StarRoomSDK</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#8-StarRtc-StarSuperRoomSDK"><span class="toc-text">8. StarRtc.StarSuperRoomSDK</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#9-StarRtc-StarChatRoomSDK"><span class="toc-text">9. StarRtc.StarChatRoomSDK</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#10-StarRtc-StarVideoRoomSDK"><span class="toc-text">10. StarRtc.StarVideoRoomSDK</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#11-StarRtc-StarVideoSDK"><span class="toc-text">11. StarRtc.StarVideoSDK</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#12-StarRtc-StarChatSDK"><span class="toc-text">12. StarRtc.StarChatSDK</span></a></li></ol></li></ol>
              <a href="#" id="article-toc-top">Back to Top</a>
            </div>
          </aside>
        </div>
      </article>
      <aside id="sidebar" role="navigation">
  <div class="inner">
    <strong class="sidebar-title">Getting Started</strong><a href="index.html" class="sidebar-link">Overview</a><strong class="sidebar-title">Android</strong><a href="android-1.html" class="sidebar-link">1.prerequisite</a><a href="android-2.html" class="sidebar-link">2.SDK intro</a><a href="android-3b.html" class="sidebar-link">3b.init(private)</a><a href="android-4.html" class="sidebar-link">4.im</a><a href="android-5.html" class="sidebar-link">5.group msg</a><a href="android-6.html" class="sidebar-link">6.chatroom msg</a><a href="android-7.html" class="sidebar-link">7.voip</a><a href="android-8.html" class="sidebar-link">8.meeting</a><a href="android-9.html" class="sidebar-link">9.live</a><a href="android-10.html" class="sidebar-link">10.other components</a><a href="android-11.html" class="sidebar-link">11.super room</a><a href="android-user-list.html" class="sidebar-link">online user list</a><a href="android-beauty-callback.html" class="sidebar-link">beauty</a><a href="android-errCode.html" class="sidebar-link">ErrorCode</a><strong class="sidebar-title">iOS</strong><a href="ios-1.html" class="sidebar-link">1.prerequisite</a><a href="ios-2.html" class="sidebar-link">2.SDK intro</a><a href="ios-3b.html" class="sidebar-link">3b.init(private)</a><a href="ios-4.html" class="sidebar-link">4.im</a><a href="ios-5.html" class="sidebar-link">5.group msg</a><a href="ios-6.html" class="sidebar-link">6.chatroom msg</a><a href="ios-7.html" class="sidebar-link">7.voip</a><a href="ios-8.html" class="sidebar-link">8.meeting</a><a href="ios-9.html" class="sidebar-link">9.live</a><a href="ios-10.html" class="sidebar-link">10.voip direct connection</a><strong class="sidebar-title">web</strong><a href="web-1.html" class="sidebar-link">1.prerequisite</a><a href="web-2.html" class="sidebar-link current">2.SDK intro</a><a href="web-4.html" class="sidebar-link">4.im</a><a href="web-5.html" class="sidebar-link">5.group msg</a><a href="web-6.html" class="sidebar-link">6.chatroom msg</a><a href="web-7.html" class="sidebar-link">7.voip</a><a href="web-8.html" class="sidebar-link">8.meeting</a><a href="web-9.html" class="sidebar-link">9.live</a><a href="web-10.html" class="sidebar-link">10.private</a><strong class="sidebar-title">Win PC</strong><a href="win-1.html" class="sidebar-link">1.prerequisite</a><a href="win-2.html" class="sidebar-link">2.init</a><a href="win-3.html" class="sidebar-link">3.im</a><a href="win-4.html" class="sidebar-link">4.group msg</a><a href="win-5.html" class="sidebar-link">5.chatroom msg</a><a href="win-6.html" class="sidebar-link">6.voip</a><a href="win-7.html" class="sidebar-link">7.meeting</a><a href="win-8.html" class="sidebar-link">8.live</a><strong class="sidebar-title">Server API</strong><a href="aec-index.html" class="sidebar-link">Overview</a><a href="aec-group.html" class="sidebar-link">group events</a><a href="aec-chatroom.html" class="sidebar-link">chatroom events</a><a href="aec-voip.html" class="sidebar-link">voip events</a><a href="aec-channel.html" class="sidebar-link">音视频流事件通知</a><a href="aec-other.html" class="sidebar-link">other events</a>
  </div>
</aside>
    </div>
  </div>
</div>

    <footer id="footer" class="wrapper">
  <div class="inner">
    <div id="footer-copyright">
      &copy; 2010-2020 <a href="https://starrtc.gitee.io/" target="_blank">starRTC</a><br>
    </div>
    <div id="footer-links">
      <a href="https://gitee.com/starrtc" class="footer-link" target="_blank"><i class="fa fa-github-alt"></i></a>
    </div>
  </div>
</footer>

  </div>
  <div id="mobile-nav-dimmer"></div>
  <nav id="mobile-nav">
  <div id="mobile-nav-inner">
    <ul id="mobile-nav-list">
      <a href="https://starrtc.gitee.io/" class="main-nav-link">Home</a><a href="https://blog.starRTC.com" class="main-nav-link">Blog</a><a href="https://github.com/starrtc/android-demo/issues" class="main-nav-link">Forum</a><a href="/en/docs/" class="mobile-nav-link">Docs</a><a href="/en/download/" class="mobile-nav-link">Download</a><a href="/en/contact/" class="mobile-nav-link">Contact</a>
      <li class="mobile-nav-item">
        <a href="https://github.com/starrtc" class="mobile-nav-link" rel="external" target="_blank">GitHub</a>
      </li>
    </ul>
    
      <strong class="mobile-nav-title">Getting Started</strong><a href="index.html" class="mobile-nav-link">Overview</a><strong class="mobile-nav-title">Android</strong><a href="android-1.html" class="mobile-nav-link">1.prerequisite</a><a href="android-2.html" class="mobile-nav-link">2.SDK intro</a><a href="android-3b.html" class="mobile-nav-link">3b.init(private)</a><a href="android-4.html" class="mobile-nav-link">4.im</a><a href="android-5.html" class="mobile-nav-link">5.group msg</a><a href="android-6.html" class="mobile-nav-link">6.chatroom msg</a><a href="android-7.html" class="mobile-nav-link">7.voip</a><a href="android-8.html" class="mobile-nav-link">8.meeting</a><a href="android-9.html" class="mobile-nav-link">9.live</a><a href="android-10.html" class="mobile-nav-link">10.other components</a><a href="android-11.html" class="mobile-nav-link">11.super room</a><a href="android-user-list.html" class="mobile-nav-link">online user list</a><a href="android-beauty-callback.html" class="mobile-nav-link">beauty</a><a href="android-errCode.html" class="mobile-nav-link">ErrorCode</a><strong class="mobile-nav-title">iOS</strong><a href="ios-1.html" class="mobile-nav-link">1.prerequisite</a><a href="ios-2.html" class="mobile-nav-link">2.SDK intro</a><a href="ios-3b.html" class="mobile-nav-link">3b.init(private)</a><a href="ios-4.html" class="mobile-nav-link">4.im</a><a href="ios-5.html" class="mobile-nav-link">5.group msg</a><a href="ios-6.html" class="mobile-nav-link">6.chatroom msg</a><a href="ios-7.html" class="mobile-nav-link">7.voip</a><a href="ios-8.html" class="mobile-nav-link">8.meeting</a><a href="ios-9.html" class="mobile-nav-link">9.live</a><a href="ios-10.html" class="mobile-nav-link">10.voip direct connection</a><strong class="mobile-nav-title">web</strong><a href="web-1.html" class="mobile-nav-link">1.prerequisite</a><a href="web-2.html" class="mobile-nav-link current">2.SDK intro</a><a href="web-4.html" class="mobile-nav-link">4.im</a><a href="web-5.html" class="mobile-nav-link">5.group msg</a><a href="web-6.html" class="mobile-nav-link">6.chatroom msg</a><a href="web-7.html" class="mobile-nav-link">7.voip</a><a href="web-8.html" class="mobile-nav-link">8.meeting</a><a href="web-9.html" class="mobile-nav-link">9.live</a><a href="web-10.html" class="mobile-nav-link">10.private</a><strong class="mobile-nav-title">Win PC</strong><a href="win-1.html" class="mobile-nav-link">1.prerequisite</a><a href="win-2.html" class="mobile-nav-link">2.init</a><a href="win-3.html" class="mobile-nav-link">3.im</a><a href="win-4.html" class="mobile-nav-link">4.group msg</a><a href="win-5.html" class="mobile-nav-link">5.chatroom msg</a><a href="win-6.html" class="mobile-nav-link">6.voip</a><a href="win-7.html" class="mobile-nav-link">7.meeting</a><a href="win-8.html" class="mobile-nav-link">8.live</a><strong class="mobile-nav-title">Server API</strong><a href="aec-index.html" class="mobile-nav-link">Overview</a><a href="aec-group.html" class="mobile-nav-link">group events</a><a href="aec-chatroom.html" class="mobile-nav-link">chatroom events</a><a href="aec-voip.html" class="mobile-nav-link">voip events</a><a href="aec-channel.html" class="mobile-nav-link">音视频流事件通知</a><a href="aec-other.html" class="mobile-nav-link">other events</a>
    
  </div>
  <div id="mobile-lang-select-wrap">
    <span id="mobile-lang-select-label"><i class="fa fa-globe"></i><span>English</span></span>
    <select id="mobile-lang-select" data-canonical="docs/web-2.html">
      
        <option value="en" selected>English</option>
      
        <option value="zh-cn">简体中文</option>
      
    </select>
  </div>
</nav>
  <!-- Scripts -->
<!-- build:js build/js/main.js -->
<script src="/js/lang_select.js"></script>
<script src="/js/toc.js"></script>
<script src="/js/mobile_nav.js"></script>
<!-- endbuild -->
<!-- Algolia -->

<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script>
<script type="text/javascript">
document.getElementById('search-input-wrap').classList.add('on');
docsearch({
  apiKey: 'c3d5d4c995b5e0c2ffb5623900279a66',
  indexName: 'hexo',
  inputSelector: '#search-input'
});
</script>


</body>
</html>